Optimal. Leaf size=93 \[ -\frac {\left (a^2+4 a b+b^2\right ) \cot (e+f x)}{f}-\frac {a^2 \cot ^5(e+f x)}{5 f}+\frac {2 b (a+b) \tan (e+f x)}{f}-\frac {2 a (a+b) \cot ^3(e+f x)}{3 f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3663, 448} \[ -\frac {\left (a^2+4 a b+b^2\right ) \cot (e+f x)}{f}-\frac {a^2 \cot ^5(e+f x)}{5 f}+\frac {2 b (a+b) \tan (e+f x)}{f}-\frac {2 a (a+b) \cot ^3(e+f x)}{3 f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 448
Rule 3663
Rubi steps
\begin {align*} \int \csc ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (1+x^2\right )^2 \left (a+b x^2\right )^2}{x^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left (2 b (a+b)+\frac {a^2}{x^6}+\frac {2 a (a+b)}{x^4}+\frac {a^2+4 a b+b^2}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {\left (a^2+4 a b+b^2\right ) \cot (e+f x)}{f}-\frac {2 a (a+b) \cot ^3(e+f x)}{3 f}-\frac {a^2 \cot ^5(e+f x)}{5 f}+\frac {2 b (a+b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.81, size = 88, normalized size = 0.95 \[ \frac {5 b \tan (e+f x) \left (6 a+b \sec ^2(e+f x)+5 b\right )-\cot (e+f x) \left (3 a^2 \csc ^4(e+f x)+8 a^2+2 a (2 a+5 b) \csc ^2(e+f x)+50 a b+15 b^2\right )}{15 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 137, normalized size = 1.47 \[ -\frac {8 \, {\left (a^{2} + 10 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{8} - 20 \, {\left (a^{2} + 10 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{6} + 15 \, {\left (a^{2} + 10 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 10 \, {\left (3 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} - 5 \, b^{2}}{15 \, {\left (f \cos \left (f x + e\right )^{7} - 2 \, f \cos \left (f x + e\right )^{5} + f \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 5.95, size = 128, normalized size = 1.38 \[ \frac {5 \, b^{2} \tan \left (f x + e\right )^{3} + 30 \, a b \tan \left (f x + e\right ) + 30 \, b^{2} \tan \left (f x + e\right ) - \frac {15 \, a^{2} \tan \left (f x + e\right )^{4} + 60 \, a b \tan \left (f x + e\right )^{4} + 15 \, b^{2} \tan \left (f x + e\right )^{4} + 10 \, a^{2} \tan \left (f x + e\right )^{2} + 10 \, a b \tan \left (f x + e\right )^{2} + 3 \, a^{2}}{\tan \left (f x + e\right )^{5}}}{15 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.74, size = 136, normalized size = 1.46 \[ \frac {a^{2} \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (f x +e \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (f x +e \right )\right )}{15}\right ) \cot \left (f x +e \right )+2 a b \left (-\frac {1}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )^{3}}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 88, normalized size = 0.95 \[ \frac {5 \, b^{2} \tan \left (f x + e\right )^{3} + 30 \, {\left (a b + b^{2}\right )} \tan \left (f x + e\right ) - \frac {15 \, {\left (a^{2} + 4 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{4} + 10 \, {\left (a^{2} + a b\right )} \tan \left (f x + e\right )^{2} + 3 \, a^{2}}{\tan \left (f x + e\right )^{5}}}{15 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.19, size = 90, normalized size = 0.97 \[ \frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (a^2+4\,a\,b+b^2\right )+\frac {a^2}{5}+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {2\,a^2}{3}+\frac {2\,b\,a}{3}\right )}{f\,{\mathrm {tan}\left (e+f\,x\right )}^5}+\frac {2\,b\,\mathrm {tan}\left (e+f\,x\right )\,\left (a+b\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________